<?php
/**
 * Created by PhpStorm.
 * User: yuliang
 * Date: 2017/10/26
 * Time: 下午4:44
 */
namespace app\common\model;


use think\Db;
use think\Model;

class Account extends Model
{
    protected $table = 'tv_account';

    protected $autoWriteTimestamp = 'datetime';

    public function get_platform_name($id){
        $name = Db::name('platform')->field('name')->where("id = $id")->find();
        if(!empty($name)){
            return $name['name'];
        }else{
            return '';
        }
    }

}